﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL.VirtualTeam.Impl;
using BLL.VirtualTeam;
using Model;
using GenericLibrariesToolKit;
using System.Text;
using Utils;

public partial class Page_Team_TeamList : System.Web.UI.Page
{

    protected void Page_Load(object sender, EventArgs e)
    {
            TeamDataBind();
    }

    //team数据绑定
    private void TeamDataBind()
    {
        string leader=WebUtil.GetIdentifier(Session["userId"]);
        TeamBO teamBO = new TeamBOImpl();
        List<Team> teamList = teamBO.GetEntityList("TeamLeader", leader,"TeamDate");
        GVTeam.DataSource = teamList;
        GVTeam.DataBind();
    }
  
    protected void LBTeamName_Click(object sender, EventArgs e)
    {
        LinkButton bt=(LinkButton)sender;
        string teamId = bt.CommandArgument.ToString();
        Response.Redirect("VTManager.aspx?teamId=" + teamId);
    }
    //分页处理
    protected void GVTeam_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
            this.GVTeam.PageIndex = e.NewPageIndex;
            this.GVTeam.DataBind();  
    }

    protected void btnRFPBack_Click(object sender, ImageClickEventArgs e)
    {
        Response.Write("<script language=javascript>history.go(-2);</script>");
    }
}